On Problems in Polymorphic Object-Oriented Languages With Self Types and Matching
نویسنده
چکیده
Subtyping is a basic concept in object-oriented languages. It supports subsumption but, unfortunately , it does not support inheritance of binary methods, i.e., methods taking another argument of type Self – the same type as the object itself. For this reason, a relation, called matching, on recursive object types has been proposed. This relation does not support subsumption but it allows to inherit binary methods. Two different definitions of matching, called F-bounded and higher-order subtyping, have been proposed and discussed. It was shown that the higher-order interpretations has better theoretical properties, i.e., it leads to a reflexive and transitive matching relation. In this paper we concentrate on two problems in languages with self types and matching based on the higher-order interpretation. We show that the flexibility of self types may not allow the programmer to define certain classes and/or methods which are based on constant values. Furthermore, the higher-order interpretation, especially in the context of bounded quantification, is too restrictive. We argue that a language should be based on both versions of matching and a notion of a type This distinguished from the type Self.
منابع مشابه
Type Checking Higher - Order Polymorphic Multi - MethodsFran
We present a new predicative and decidable type system , called ML , suitable for languages that integrate functional programming and parametric polymorphism in the tradition of ML 21, 28], and class-based object-oriented programming and higher-order multi-methods in the tradition of CLOS 12]. Instead of using ex-tensible records as a foundation for object-oriented extensions of functional lang...
متن کاملOptimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches
Polymorphic inline caches (PICs) provide a new way to reduce the overhead of polymorphic message sends by extending inline caches to include more than one cached lookup result per call site. For a set of typical object-oriented SELF programs, PICs achieve a median speedup of 11%. As an important side effect, PICs collect type information by recording all of the receiver types actually used at a...
متن کاملMatching Scores of System Relevance and User-Oriented Relevance in SID, ISC and Google Scholar
Background and Aim: The main aim of Information storage and retrieval systems is keeping and retrieving the related information means providing the related documents with users’ needs or requests. This study aimed to answer this question that how much are the system relevance and User- Oriented relevance are matched in SID, SCI and Google Scholar databases. Method: In this study 15 keywords of ...
متن کاملObjective ML: An Effective Object-Oriented Extension to ML
Objective ML is a small practical extension to ML with objects and top level classes. It is fully compatible with ML; its type system is based on ML polymorphism, record types with polymorphic access, and a better treatment of type abbreviations. Objective ML allows for most features of object-oriented languages including multiple inheritance, methods returning self and binary methods as well a...
متن کاملType inference for polymorphic methods in Java-like languages
In mainstream class-based object-oriented languages with nominal types, like C++, Java and C#, typechecking algorithms require methods to be annotated with their parameter types, which are either fixed or constrained by a (nominal) bound. On the contrary, languages like ML, CaML and Haskell use powerful type inference algorithms capable of calculating the type for a function in which parameter ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Fundam. Inform.
دوره 71 شماره
صفحات -
تاریخ انتشار 2006